/*
 * @Author: mjj
 * @Date: 2021-10-27 15:37:21
 * @LastEditors: mjj
 * @LastEditTime: 2021-10-27 17:08:56
 * @Description: 
 */
import request from '@/utils/request'
export default {
    namespaced: true,
    stae() {
        return {
            productCategories: []
        }
    },
    mutations: {
        SET_CATEGOIES(state, payload) {
            state.productCategories = payload
        }
    },
    actions: {
        async findAllProductCategoies({ commit }) {
            let res = await request.get('/product/pageQuery', {
                    params: {
                        page: 1,
                        pageSize: 1000
                    }
                })
                // 提交突变
            commit('SET_CATEGOIES', res.data.list)
        }
    }
}